#ifndef __IINT_PRO_COM__
#define __IINT_PRO_COM__

#include "IObject.h"

class IInterProcessCommunication: public virtual IObject
{
public:
	virtual void CallBakFun(IData * ptrMsgObj) = 0;
	virtual const unsigned long ProcessID() = 0;
	virtual void SetProcessId(unsigned long ulProcessID) = 0;
    virtual void SetCallFunc(PCallBakFun ptrCallBakFun, void * ptrArg) = 0;
	virtual void AddhData(IData * ptrTask) = 0;
    virtual bool SendAsynTask(IData * ptrTask) = 0;
    virtual bool SendAsynTask(unsigned long ulProcessId, IData * ptrTask) = 0;
    virtual bool SendAsynTask(const char * pszAppName, IData * ptrTask) = 0;

    virtual bool SendSyncTask(IData * ptrTask, IData ** ptrReslut, int iTimeOut = 60) = 0;
    virtual bool SendSyncTask(unsigned long ulProcessId, IData * ptrTask, IData ** ptrReslut, int iTimeOut = 60) = 0;
    virtual bool SendSyncTask(const char * pszAppName, IData * ptrTask, IData ** ptrReslut, int iTimeOut = 60) = 0;

	virtual const char * SendQueueName() = 0;
	virtual const char * ReceiveQueueName() = 0;
	virtual bool InitThreadPool(int iType) = 0;
};

#define _CREATE_PTR_IPC Invoke<IInterProcessCommunication>("CInterProcessCommunication", nullptr, nullptr, 0);\

#define CREATE_PTR_IPC(ptrIpc)\
  shared_ptr<IInterProcessCommunication> ptrIpc = _CREATE_PTR_IPC\ 

#define CREATE_IPC(ptrIpc)\
  ptrIpc = _CREATE_PTR_IPC\

#endif//__IINT_PRO_COM__